

#ifndef IMGUI_EXAMPLE_GLFW_VULKAN_RESOURCEMANAGER_H
#define IMGUI_EXAMPLE_GLFW_VULKAN_RESOURCEMANAGER_H
#include "PreStd.h"
#include "RenderPassReflection.h"

namespace Bonnie{
    class ResourceManager {
    public:
        using SharedPtr = std::shared_ptr<ResourceManager>;

        static SharedPtr create();

        bool registerField(const std::string& name,const RenderPassReflection::Field& field,uint32_t timePoint,const std::string& alias = "");
        struct ResourceData{
            RenderPassReflection::Field field;
            std::pair<uint32_t,uint32_t> lifeTime;
        };

        void clearRGResouce();
    private:
        std::unordered_map<std::string, size_t> mName2Idx;
        std::vector<ResourceData>mReources;

    };
}


#endif //IMGUI_EXAMPLE_GLFW_VULKAN_RESOURCEMANAGER_H
